package com.tjvib.view.dialog;

import android.app.Application;
import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.tjvib.R;
import com.tjvib.TJVIBAPP;

public class NotFoundDialog extends Dialog {

    private Context context;


    public NotFoundDialog(@NonNull Context context) {
        super(context);
        this.context = context;
    }

    public void showDialog(String con, View.OnClickListener cancel) {
        if(context == null) context = TJVIBAPP.getContext();
        View view = LayoutInflater.from(context).inflate(R.layout.dialog_not_found, null);
        this.setContentView(view);

        TextView dialog_not_tv_con = this.findViewById(R.id.dialog_not_tv_con);
        dialog_not_tv_con.setText(con);

        this.findViewById(R.id.dialog_not_iv_close).setOnClickListener(cancel);
        this.setCanceledOnTouchOutside(false);
        this.show();
    }

}
